<!DOCTYPE html>
<html>
<head>
	<title>onXLS / onXLE / callback</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<style>
		div#sidebarObj {
			position: relative;
			margin-left: 10px;
			margin-top: 10px;
			width: 600px;
			height: 450px;
			box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.09);
		}
		div#eLog {
			position: relative;
			width: auto;
			height: 180px;
			padding: 2px;
			border: 1px solid #dfdfdf;
			font-family: Roboto, Arial, Helvetica;
			font-size: 14px;
			color: #404040;
			margin-left: 10px;
			margin-top: 50px;
			overflow: auto;
		}
	</style>
	<script>
		var mySidebar;
		var eLog;
		var eCount = 0;
		function doOnLoad() {
			eLog = document.getElementById("eLog");
			mySidebar = new dhtmlXSideBar({
				parent: "sidebarObj",
				icons_path: "../common/icons_material/",
				width: 160
			});
			mySidebar.attachEvent("onXLS", function(id){
				logEvent("onXLS");
			});
			mySidebar.attachEvent("onXLE", function(id){
				logEvent("onXLE");
			});
			mySidebar.loadStruct("../common/sidebar.json", function(){
				logEvent("callback");
			});
		}
		function logEvent(name, itemId) {
			eLog.innerHTML = (++eCount)+") event fired: "+name+"<br>"+eLog.innerHTML;
			eLog.scrollTop = 0;
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div id="sidebarObj"></div>
	<div id="eLog"></div>
</body>
</html>